package com.coldworks.base;

import com.coldworks.base.manager.BaseConfManager;
import com.coldworks.coldjoke.util.CONST;
import com.coldworks.coldjoke.R;

import android.os.Bundle;
import android.text.Html;
import android.text.SpannableString;
import android.text.method.LinkMovementMethod;
import android.view.KeyEvent;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.TextView;

/**
 * “关于”页面
 * 
 * @since 2012-03-23
 */
public class BaseAboutActivity extends BaseActivity {

	SpannableString msp = null;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		try {
			log.info("start");
			setContentView(R.layout.activity_about);// 直接显示布局文件
			// TextView versionName = (TextView) findViewById(R.id.versionName);
			// versionName.setText(getResources().getString(R.string.version)
			// + " "
			// + BaseConfManager.getInstance().getVersionName(context));

			log.info("done");

			findViewById(R.id.button_back).setOnClickListener(
					new OnClickListener() {

						@Override
						public void onClick(View v) {
							finish();
						}
					});

		} catch (Exception e) {
			log.error("", e);
		}

	}

	@Override
	public boolean onKeyDown(int keyCode, KeyEvent event) {
		if (keyCode != KeyEvent.KEYCODE_BACK || event.getRepeatCount() != 0) {
			return super.onKeyDown(keyCode, event);
		}
		// 捕获到返回键
		finish();
		return true;
	}
}
